Fix minor error in ErrorHandler

Improve fatal error handling
Changes for code consistency