Fix missing imports and bugs found thanks to new objj compiler