first bunch of error fixing for compile