Fixed #1017