Fix error during generation