Fixing handleClick callback