fix bug to use order