partial fix for #41