some fixes for automatches