Fix for selection state change that was triggered incorrectly