fixed regex patterns
more fixed log.ref