Fixed typo in auth check