[7716] Fixed some typos and possible crashes.