Merge pull request #110 from ityaptin/master

Fix issue with missed endif