javascript errors caused