fix hide/show issue of custom control