fix broken sample code

Reviewed in https://codereview.appspot.com/9798047/