Made component sorting work consistently on every run.