Several fixes in engine code