fixed #866