rework tweak to make sure it works in all cases