Some fixes for the new compiler