better fix for #47