Fixes problem with numbers being out of order.