fix dead assignments