Fixes #1107, fixes #1106, fixes #1105, fixes #1104, fixes #1100 and fixes #1099