fixed undef bug and added ping
v1.0.1