various fixes related to state machines
fixed a bug introduced with the last commit
fix component type