Fixed database ordering