fix Counter and Alarm