fix infinity test