pregenerator fixes