Fix bugs when DB has one user