commits related to RavenDB-1520, RavenDB-1521, RavenDB-1539