Bug fixed multiple state processing