fixed wrong controller type check