Fixed frame id increment bugs alternatively with goto state