Fixed some bugs in Endpoints methods