fixing event observer place in code.