Fixed issues with endpoint initialization