fix memory m+, m-, and mr