Fix bug on resume.