fixed bug with reloading resources
state machine examples updated