fix bug #767