Fix promise state tracking and compliance stats.
Merge pull request #736 from maciejmrowiec/master

Fix promise state tracking and compliance stats.