fix keyerror when updated_preview is called