fixed #847