fixed #669
fixed #683