fix errors in some browsers