Fix API for frontend