Fix applications controller tests