Avoiding NaN-s.
Made the test more reliable.