Fix and test compatability func