Added more support for older browsers