Offline charging fix

If I am right, this should completely fix offline charging