Fix crash if notice count is not integer

Change-Id: Idd712e769f3c47a7926147138b0fed11b626e9f0