only set hidden prop if hidden