fixed #1216, thank Antti Perkiömäki for reporting
Authored by: winterheart 2008-09-14
Parent: [r1828]
Child: [r1830]