fixed a bug regarding the alarm message