Fix problem action is nil
Refactor