Fixing bug where hide/show was not working