Fix query to show content in correct order