fix clayout switching back to original tab when flipping