Removed exit() function from fsm states. Bug fixes