Fixed exception related to failure to generate snippet