Fix gallery loading