fix some rt cleanup and failure edge cases

unused import?