bugfix if endpoints option is undefined