Fixes #19, #20