fixes #1310
implements #1332
fixes #1103; fixes #1297
fixes #1328
fixes #1167
fixes #933
fixes #1323