for #64 and tweak for #66