fixed #670