Fix comparation in alert switch method

Fix comparation in alert switch method