Fixed undefined chat_ids