fixing context nesting
fixing db loading in RestService