FORGE-1502: Fixed ArrayIndexOutOfBounds while running ls