Changed timing on calling function to replace hashtags