fix a few bugs in the last commit and remove comments