fix bugs running on ubuntu