Fix the UI layout of query result view