fix bugs and cancel debugs