Fxed some bugs,