cleaning log. fixing context