Fixed crash when clicking inside the view

Closes #34