Fixed code because of bug 238071 in Chrome 27