improve amsmath match