Fixed errors when running on different version of Ubuntu