Fix bug in creation of question databases