Fix crazy memory allocation!

The current test would allocate 500 more items
EACH TIME the function is called!

Fixes #1