Fix hidden element issue