fixed small bugs preventing build.