Fixes #1026
Fixes #1024
Fixes #1023
Fixes #1022