[0.0.33m] Made the database lookup one query, not multiple ones