fixing a few bugs and links