Fix view update bug