Fixed declaration for length variables