Added callbacks for messages