Rename all variables with name "length" to avoid collisition with "Length" function