Fix #1051
Fix #1052