Bugfix and make regexps stricter