Proper fix for http://eden.sahanafoundation.org/ticket/1285