fixed #871