more database bugs