Fix endpoint class.
Merge pull request #1 from alesj/master

Fix endpoint class.