fixed the issue with the compareValue validation computing amounts to Na...

...N and hence giving unpredictable results