fixed issue with the second initialization of order