Fixed plugin and scan bugs when -A and -B were used together.