fixed guard and adjusted config/modes