Fix nested controller bug