Fixes to #49 implementation