Fixed finally block. Was implemented incorrectly