fixing resolving of endpoint