fix generating of visit