Fixing Pi sample