Fixed not unlocking mutex in dictionary