Move that return statement outside of if statement. Protect update in the same way.