Help me figure out how to get rid of this feedback loop