Post increment instead of pre increment was messing it all up.