Fixed math extension check