fix s2w bugs