fixing bug on chrome 31.x (see issue #207)