Fixed a bug when hiding CommandMenu will not hide opened layer

Fixed #90