Fixed bug where double clicking in empty space would cause seg fault