Optimized. Fixed problem with done_with_warnings.