fix bugs: lose cos