alarm manager and test fix