more bug fix, trying stuff to fix errors on pi