fix bug with coords in mouseup event