mathmo: fixed prev/next shares and restores