Fixed try catch for edit