Fixes fatal error causing generator to crash