fix bug and create test for bug pushToken

-fix issue #553
-create test for issue #553