References #2520: Fixed two race conditions and added appropriate model clean up to prevent issues when loading filter state.