Fix problem that doen't set 'state'.