Hide / show is not working correctly