Fixed all build bugs