fixed string comparison bug and more typos