make a copy otherwise other ports will receive popped arrays, closes #3