fixed assignment error