Fix for Select all/Deslect all pattern.