Fix documentation example code

See http://stackoverflow.com/a/26759417/13860