Fix a billing period bug that caused emails to be sent twice.