Update length functions.