bugfix for reordering