Fix a bug when code snippet points to the wrong line