Fixes https://emqx.atlassian.net/browse/EMQX-12684 Fixes https://emqx.atlassian.net/browse/EMQX-12678