Updated

The Oakland Athletics seemingly had put their troubles behind them. However, a loss to lowly Houston in Tuesday's opener suggests otherwise.

The A's try to get themselves untracked Wednesday when they play the second test of a three-game series versus the Astros at O.co Coliseum.

Houston managed just its third win in 19 games all-time against the A's on Tuesday, as Brandon Barnes hit a two-run double to power Houston to a 5-4 victory.

It nearly turned into an Oakland victory in the ninth as Chris Young ripped an 0-1 pitch with a runner on base that just missed the left field foul pole by inches. The umpires reviewed the play as it appeared that the ball might have nicked the outside of the pole, but the on-field call stood. Young struck out on the next pitch to give Chia-Jen Lo his first career save.

"From our vantage point we couldn't tell, but the reaction from Chris said to me it had to be reviewed," said A's manager Bob Melvin. "All I wanted was for them to take a look and I appreciate that they did."

Jason Castro scored once and drove in a run, while Chris Carter also had an RBI for the Astros, who snapped a six-game losing streak. Jordan Lyles (5-6) gave up one run on five hits with two walks and three strikeouts in seven innings.

"I think it was big," said Astros manager Bo Porter about stopping the streak. "Jordan pitched a great game, offensively we did just enough to win the game."

Yoenis Cespedes went 3-for-4 with a two-run home run for the Athletics, who stayed a game back of Texas for first place in the AL West as the Rangers lost to the Brewers on Tuesday. Bartolo Colon (14-5) dropped his second straight start as he gave up five runs on seven hits in four innings of work.

Getting the call for the Astros on Wednesday will be young right-hander Jared Cosart, who is 1-0 in five big league starts with a 1.36 ERA. Cosart, though, hasn't received a decision in any of his last four starts, but has been terrific.

Against the Boston Red Sox last Wednesday, Cosart allowed two runs and seven hits in five innings. However, he did walk five batters for the second time this season and Houston lost, 7-5. The Astros are 2-3 in his five starts.

Cosart gave up one earned run in seven innings to the A's back on July 23, a game Houston won 5-4.

Oakland, meanwhile, will counter with righty Jarrod Parker, who is 6-0 with a 2.92 ERA over his last 13 starts. Parker won his second straight start on Friday in Toronto, as he held the Blue Jays to a three runs and six hits in six innings to run his record to 8-6 on the year to go along with a 4.04 ERA.

Despite losing Tuesday's opener Oakland is 11-2 against the Astros this season.