Fixes #14, #51