Fix issues #1051