fix bug when message form was invalid