added null safeguards for watch