Small optimization to the update routine