fixes for #83 and #84