Strict mode: properly close cursor when creating check in dialog.