Fixes #19, possibly fixes #20