Full fix for #11