Bugs fixed in the view file