Fix compile errors using math mode