Fixed #904
Fixed #906