Fixed bug with uninitialized classes in workers