fixed #1007