bug fix for negative numbers in conditions