Fixes #17, #16