Fixes compilation errors
The packets which are dropped because there is no energy left are now recorded