Hopefully fixed so other packages can use this function