fix bug with mousedown callback function