Issue #4 - Fixes invalidation logic

- The test was broken using `surveId` instead of `surveyId`
- Use a local `alias` for making the code clearer