WIP: set number of pending packets correctly