Fixed #975
Fixed #974