Fix bug passing CustomActionData
Reformat code