fixed bug with observer