fixed an error in the listener. the listener was over writing old values
with new ones every time they were added.