take out an unnecessary condition check when setting the current length