fixing ClassCastException in Mm