fix issue 1346
fix issue 1347
fix issue 1351
fix issue 1353