Fixes #282
Fixes #326
Fixes #285