[core] fix intent handler leaking (Fixes #162)