Fixed #1047