fix for SF bug #250.
Applied the suggested patch, seems OK, test suite is running with no problem.
fix for SF bug #250.