Fix theme loading

* Be sure to close buffer