fixed #877