Replaced error_handler routine with FATAL macro.
Added missing endwin() call before exiting fatal.