corrected a bug in evaluation with negative numbers