$col variable was undefined in it's scope