Typo errors

One 'end' and one 'origin' variable undeclared