fix not defined variable msg{'apci'}