Error fixes from last merge