fix error when twitterdata is empty