detect state changes by problemid instead of stateid