Fixed bug in view