Added compatibility for older browsers.