fixed bugs for deployment