Fixed an issue where invoice id's were being created incorrectly.