fix some rt cleanup and failure edge cases