fix bugs in observer pattern matcher #5