Invoice Number will not set to 201700(1+)

Every time if i write a new Invoice it will set the Invoice number to 20160044. 2016 is over an i beginn with 2017001, but the new invoice will not set to 2017002. I have set manually 8 Invoices for this year. Can you tell me why it will not work?

You must have an invoice numbered 20160043, which is a larger number than 2017001.

Your 2016 numbers are 8 digits or 20,160,044
Your 2017 numbers are 7 digits or 2,017,001

20 million is larger then 2 million.
You need to add an extra 0 to 0001