Fix hide/appear problem