fix for slow cpus such as rpi failing on first run