Merge pull request #281 from akofink/master

Fixed a syntax error with an extra 'end'