fix bug when using multiple rat