perhaps a fix for #6, #47