handle displaying a 1 badge for ios and fix a crash for android