fix result order issues