fix overflow when displaying MAD