Fixed few bugs in previous commit

Conflicts:
	src/ui/view.cpp