fixed typos and not handling maps thread deletions correctly