fix bugs on Sfp::Runtime#get_state (need optimisation)