fixed #785