fix wrong detection