added view id checks
Merge pull request #212 from attilaz/checks

added view id checks