Reset data variable after foreach loop, fixes #23.
Merge pull request #24 from georgkoester/issue/23

Reset data variable after foreach loop, fixes #23.