Fixed logic problem in the order of when index is decreased #550
Merge branch 'od/issue_550' into develop