fix a couple retain cycles in the spirit of #248