fixed error when gen already exists