bugfix: status check was incorrect