fixed some bugs for previous push.