Fully functioning alarm and log history bug fix