Fixed loop on StatePattern