fix for bug #536