solve ldw

& fix g_tk bug