Some fixes to compilation