Fixed up bugs in the code