fixed initial click from mousedown to onclick