Conditional update field not working properly