avoid removing items of the handler list while iterating over it; #179