Fix error mgs without code