Fixing a potential bug in #math