Fix err with observer declaration