Fix problem with boolean test