some cleanup and remove invalid and unnecessary resume call