Fix for error handling

Previous bitmask for fatal error was completely wrong and worked as intended by sheer random.