fixed errors in actions.rb