javascript errors solved