fixed problem with initially empty mongodb