fixed out of bounds in mn_decode