Change scan order for "applyConstrains" method