Added cross-broswer compatibility