fix #1279 and #1261 - 2.7.3 crashes

fix #1279
fix #1261