BugFix

Added unit->setState(state);