Added exception for edit if list is empty