Fixed bugs on Ubuntu host