fix bugs in Ubuntu