fix bug in update_status code