fix histogram toggle scripts