Complete fix for #44