Fixing schema bugs based on changes made by @kodok-buncit