Updated and fixed small bugs