fixed small bugs.