Fixes #1568
Fixes #1582
Fixes #1504
Fixes #1556
Fixes #1527
Fixes #1538