FIX: Use gallery ID only if is valid number