return error before setting click count and fix typo