fixed spelling and one undefined error