added lock for linked list of callbacks