added error status SHUTDOWN
removed strange code