resolving some new javascript errors