fixing bug #891
Merge branch 'pr893'