Fixed #787