Fixed crash, caused by adding an observer and not removing it.