fix bug in status handling