Fix result assignment error