Fix some errors introduced in e51976e17a29bd2a318dc84e42cc24d3e9c877ae

https://github.com/TrinityCore/TrinityCore/pull/11852