fixed an issue with worker loading scripts
fixed type checking for deserialized structures