fixed bug in selection after copy and paste