Fix adding custom endpoints