fix regular expression; fix tooltip behavior