fix bugs for spec