Added mutex to prevent sync issues with windowlist.