Fix for passing endpoint