more fixes for the resume function