expect error fix