smartactive: fix some bugs