prevent syntax errors in snippet