Fixed diariooficial bug and state bug