Fix bug and refactor global_actions in graders