cherry pick from https://gitlab.com/trinitycore/TrinityCore_434/commit/335a1a3a7a8d1cb079e20719b589c87decd6bb93
hotfixes