fix firefox support, regex stuff