fix InexactError mentioned in #9040