Fixed bug with undefined targ[pos]

Removed unnecessary semicolons.
Fixed bug with undefined targ[pos].
Fixed comment.