Some fixes to make stuff compile