Fix Issue 5835

Issue URL: https://d.puremagic.com/issues/show_bug.cgi?id=5835