fix detection and controller