Fixed a bug in default endpoint