fix pop withdraw functions