fix a couple retain cycles in the spirit of #248
Fixed retain cycles and added retain cycle check flag to the project settings,