fixed getSelection