bug fix for dealing with infinity result