Fixed a bug with select statements that are not inherently thread safe. Fixed some spelling errors.