counter fix for ios