Fixing the view update bug