weird compilation errors with enums