Fix script condition