Fix edge case with repeated calls