Fixed the logic for select all with ctrl-a