Fix issue with infinity