fixed alarm init bug