Fixed smaller things in the update routine