Fixed code snippet bug