Fix prefix grammar problem and math import.