fixed chrome 27+ issue including backwards compatibility

fixed chrome 27+ issue