Just a quick fix. I might chnage this back to a better readable format. This was causing issues when redirecting, not all link ids where changed! This caused some redirects to break.