fixed some bugs whan deploy