fixes issue #5717

see https://github.com/Baystation12/Baystation12/issues/5717