fixed bug with detecting status change