Fixed crash bug in twitter.py