Fix for http://sunflower.sahanafoundation.org/eden/project/task/358