Fixed crash when trying to copy with empty selection