we get an empty array when there is no selection, so handle this