duplicate key error fixed and index added

Signed-off-by: Jens Schanz <mail@jensschanz.de>