Fix for bug #660