fixing some view bugs