Removed unnecessary edit mode switch as per comment by Ghost