Fix early exit cleanup