fixed #1006