Fixes crash with only one virtual desktop.