Proper fix for #579