Fix bug in AlarmManager