County ends deal to purchase building