Added a test and the observer bug fix