fixed issues with RavenDb references