fix some Dead assignments