added missing #undefs at end of file