state editor enhenced and keep_state in event restored