Fixing Pi examaple