fix some assignment errors