fix some deprecate methods in badge lib