More error fixes from merge