Fixed resume function.