Fixes bug where functions cannot be unobserved