Fix error of undefined message variable