Fixes #413
Fixes #410
Fixes #409
Fixes #408