Henreik Storner's fix patch.

svn path=/trunk/; revision=1744