Prevent to modify collection during iteration
Fix NPE potential issue