In the third Pirates of the Caribbean how did jack escape the kraken?

In the third Pirates of the Caribbean Jack is rescued from Davy Jones' Locker after he is eaten by the kracken. After Jack is rescued you find later in the movie that Lord Beckett ordered Davy Jones to kill his "pet" and you see the kracken dead on a beach.