Removed small bug in update status function