fixed the bug connected with removing observer twice