fancy gallery merge correction