Fixed errors when building on ubuntu