fixed row order error due to merge