fixed #821