fixed bug on drag