fix bugs for Observers test codes