changed z index of legend