Fix javascript errors.