fix bug with nextChangeMillis