Fixed various click handling bugs.