Preventing #6 to happen in case of empty .