Some small changes to remove some unnessesary bugs