fix hiding gallery