Fix for #84 and #63