Improve mouse button functionality