Fixed some errors on other build environments