fixed bugs after unit test

git-svn-id: file:///var/www/svn/anahita/subscriptions/trunk@17369 a933e228-e664-4d3f-8241-49479697c698