Fixed bugs in Monoid instance