Fixes #780
Port a99179d31f and 09147186b7 to glitch-soc
a99179d31f
09147186b7
Change inspired by 691107263c
691107263c