fix unused import and use of die