Fixed scaling in update function