Improved so we don't get js-errors