fixes for pi