fix linking by id to work across files