fix minor issue with return order