Fix issues with Teragen Hang