Bugs :(

seems to an issue with the timeout in the ping function, it's not
working, just hangs if it cannot reach the server.