Various bug 

Various bug fix