Fixed a bug in drag selection