Bugfix:

Submitted by sg77: http://forum.allegorithmic.com/index.php?action=profile;u=20528
http://forum.allegorithmic.com/index.php/topic,917.msg3860.html#msg3860