Fixes api controller tests