Fixed #667