Fix documentation

Fixed errors in example code