fix in horizontal show/hide function