Fix for setting actor in toJSON