Fix custom actions failing on undefined