FIXED BUG in MDS code