fixed #791