Fix the definition of the action function.