fixes the text replace to be somewhat more generalized and insenstive to changes in published store hours
fixes the possibility that the index will be negative