fancy gallery correction