Fix bug in chrome 29+