fixed a bug in Element.show and Element.hide