Fix for #93 and #94