fix for https://github.com/Baystation12/Baystation12/issues/3887

Thanks to AquaDraco for the fix
Merge pull request #3998 from DJSnapshot/hotfix

bugfixes!