Minor improvements on controller injection.