code preview error fix