fix error on old browsers