Fixing a few bugs!