Fix #452 improve resume behavior