Fixes issue with invoice and order number generation