Compilation fixes, fix fly mode switch