Fix typos and horrible math mistake