Fixing getSelection to handle when nothing has been clicked