Fixed bug in out_handler.