Fix for bug #39