Fix MB-669

Fix done by Ishara Premadasa in svn commit r203786.
Merge pull request #4 from a5anka/MB-669

Fix MB-669