Fixes #14 and #18