Fixed compilation and made autonomous more reliable