Pulling in patches from opencobra:master