Fixed iteration bug for non-chrome browsers