Fixed some bugs on 0826