fix few bugs
bug fix