opkg: fixing some trivial defects while reviewing code