Fix API endpoints