Fix building errors