Fixes #5, #20