fixed #822