Fix some problems with connecting to available wifi networks

Signed-off-by: Simon Busch <morphis@gravedo.de>