fixed small bugs