Fix bug with popup in IE after finishing course