Issue ended up being I was using a variable with the same name as a column, I changed that variable to a different name and it works fine.