Fix bugs and improve announcement management function