More correct querying user database