Fix wifi function