Some fixes to allow compilation