fixed #865