fixed onShown bug