fixed #1047