Fixed reordering bug