bug fix

fixed some minor bugs