Probable fix for #513