fixed some logic
added maxFlame timer