Partly fixed the old code for multiple key columns.
Added new macro that also updates the current position.