fixed showing the notifications based on switch in preferences