Fix for bug #361