Reset data variable after foreach loop, fixes #23.