fixed a typo and simplified a before_action