Fixes some routing and endpoints errors