fixed a problem, when 'links' are not represented as List but rather as Map