Corrections

missing "end"
mistake in variable name