Bug fix for bug #1