implement changes in Lib commit https://github.com/CanaryModTeam/CanaryLib/commit/cc742e354aae0c1525691a4304571b604f37d5c4