Fixes #1157. Fixes #1150. Fixes #1208. Fixes #1203 Fixes #1195.