Switching back to 23 states, fixed mag update logic