tweaks for pi
fix mem leaks on pi