Fixing redirect issue when updating