Hopefully fixed database problem