Fix on set_endpoints method
Merge branch 'endpoints'