Fix update assignment function