Fixed update code that got changed when merging