Cowboys turn the tide in third quarter in win