Refactored add_hashtags method to fix bug.