added -1-entries to the pin_ids array, so get_id returns the right value