fixed bug #6.