fixed a few bugs so that we can build the project