unset pw flag too early