fixed pw bug