Fixed some errors on build