small bug in updating view