Fix ping check aswell. Tests would be good...