Fix gallery recognition