Upgrade to TK 0.5.1