bug fix on visit