Fix automation minor bugs.