Fix API routes