fixes issue #26
Merge pull request #244 from manolo/mcm_issue_26

Fix for issue 26