fix issues with update code