Fixed some view logic