Fix state restore by using ClassLoaderCreator