Fix bug in handling of status