Locally declare listenersToPut instead of calling this.listenersToPut. And only ask for the length of listenersToPut once.