Correct javascript errors introduced with last update