fix for WEP connections

Thanks to ivendor