better displaying of javascript errors