Adding controller detection.