show hide logic, fix layering