implemented the fix from stefan.