update zIndex (it seems still has a bug)