fix bug for nullPointerEx when draging