added workaround for ios browser bugs