fixed an error for pi