Finally figured it out. Stupid cursor