fixed handleClick bug