API Example fix

Fixed example code placement.