fix to generator