Fix view logic