Fixed #1008