fix bug in some browsers