An increase in ethanol sales wasn't enough to save Pacific Ethanol (NSDQ: PEIX) from missing Wall Street expectations in the second quarter.

The Sacramento, Calif.-based company on Monday posted a net loss of $10.5 million, or 23 cents per share, compared to a profit of $1.1 million, or three cents per share, for the same quarter a year ago.

Analysts had expected the company to lose 13 cents per share on revenue of $206.2 million, according to Thomson Financial.

Pacific Ethanol's quarterly revenue grew 74 percent to $198 million from $113.8 million generated from the year-ago period.

Ethanol sales increased or 52 percent to 66.8 million gallons during the second quarter compared to 43.9 million gallons for the same period in 2007.

The company also said its average sales price for biofuel grew 10 percent to $2.55 per gallon compared to an average of $2.32 per gallon for the year-ago period.

But steep corn prices hacked away at the company's margins. The average corn prices paid by the company increased 67 percent to $5.98 per bushel for the quarter, compared to $3.59 per bushel during the same period last year.

That’s lower than the average price of $6.30 per bushel paid for corn in the quarter, according to the Chicago Board of Trade. Pacific Ethanol's gross margin was 0.2 percent for the quarter, a steep drop from the 9.8 percent it reported in the year-ago quarter.

"We faced a challenging commodity environment this quarter and are disappointed with our net loss," the company's CEO Neil Koehler said in a statement.

Wall Street wasn't pleased either. Investors sent company shares down 13.5 percent, to $2.05 per share Monday.

Market conditions have been rough on biofuel companies in the last year. Feedstock prices have grown as biofuel process remained low, squeezing company margins and causing a number of plants to be delayed or cancelled in the last year (see Mascoma to Play Smaller Role in Pilot Project, Plans for Two Cellulosic-Ethanol Plants Scrapped, Another Ethanol Plant Gets Cancelled, Poet Cancels Ethanol Plant, Ethanol Margins Suffer and Ethanol’s Tough Times Continue).

In late June, corn reached a record-high trading price of $7.54 per bushel, said Rick Kment, a biofuels analyst at DTN.

Kment said that looking forward things could get better for ethanol company margins if corn prices start to settle back down. For the last three weeks corn prices have been falling Kment said. On Monday, corn futures closed at $4.97 per bushel for delivery in September and $5.17 per bushel for delivery in December.

But JinMing Liu, a senior analyst for Ardour Capital Investments, doesn't think Pacific Ethanol will benefit next quarter even if that happens.

"I believe their margins will be as bad as this quarter," he said.

Liu said Pacific Ethanol's business model calls for it to set up ethanol plants close to livestock-producing regions, where it can sell livestock feed, an ethanol byproduct, directly into the local market.

Pacific Ethanol already has plants in operation in Boardman, Ore., Madera, Calif., and Burley, Idaho, and owns 42 percent of Front Range Energy's ethanol plant in Windsor, Colo. The company also plans to open another plant in Stockton, Calif., by the end of this month (see Pacific Ethanol to Open New Plant This Month).

But Pacific Ethanol's model means that the company has to pay to transport the corn, which is mostly grown in the Midwest, to its plants, Liu said.

This added an extra 75 cents of cost to each bushel of corn during the second quarter, he said. "The transportation cost nullifies any advantages they have locating their plants next to the market."

Also, the company has $43.8 million in debt that it has to repay in the next year, Liu said. "I don't see how they can come up with the cash from their operations."

Including the $43.8 million in payable notes, Pacific Ethanol reported second-quarter liabilities of $135 million.

Liu said he believes the company will have to raise more money by selling additional shares, which might result in dilution. In spite of the industry hardship, companies continue to push for new plants.

AE Biofuels on Monday announced it has opened a 9,000 square-foot demonstration plant that can make ethanol from cellulose feedstocks, as well as from a combination of cellulosic and starchy feedstocks such as corn.

Earlier this month, BlueFire Ethanol said its first cellulosic ethanol plant is on track to begin production next year and announced plans to begin construction on a second plant next year (see BlueFire Ethanol to Build $130M Plant in Mecca).

Fulcrum BioEnergy, Coskata and Range Fuels, among many others, also are developing cellulosic projects. Cellulosic ethanol is made from nonfood biomass like switchgrass, wood chips and corncobs.

Advocates say cellulosic technology could significantly boost the amount of ethanol that can be made without competing with crops for food, but companies developing cellulosic ethanol haven't yet been able to produce it at large volumes or affordable prices.