Potentially fixing a few bugs