fixed bugs

fixed bug with text selection