Fix port selection
Fix encoding for image values