fix the bug caused by generator classloader