aoloop: fixed changing M sizes