Changed click handling for function calls