Fix for bug #2221