fix typo in before hook