fix the bug for image check