fixing pw bug