Fixed engine code compile errors