bug fix

fixed some small bugs