Attach code properly on ping