Problem inserting keys in association list

I have the following code: (get_assoc(Line, Assoc, Value) -> Value1 is Value+1; Value1 is 1), put_assoc(Line, Assoc, Value1, Array). When I try to add the key: 3581 with value 1 and the key 2619 with value 1 the first pair is successfull while the second fails. I am providing a screenshot of the trace failure.