infinite fire bug fixed with state application