Fixed errors on building extensions.