fix a exception in weatherextension

Change-Id: Ic8cf28969414a22d2134bac7b2a4be6f14b69e6e