Bugfixes to reordering - Phase I