tweaks for javascript errors