Fix to bug #681