Fix bug which crashed the gui when selected an empty line in the