Fixing the for localStorage loop for FF3.6