fixed header errors in js