Complete fix for #439