fix tabclick and reorder logic