fixes on pi due pointer issues