HELIX-197: fix state model leak, rb=13437
HELIX-197: fix state model leak, fix compile error, rb=13437