MockDatabase fixes