fixed bugs for v0.8