Bug fix in snippet