Fixed a sample code a bit