fix for closure serializer exception "Serialization of 'Closure' is not ...

fix for closure serialization exception "Serialization of 'Closure' is not allowed"