Fix gallery path in hook