fix for bug586