fixing bugs for deployment