Fixed up bugs in compilation