* Bug fix: avoid cast exception
* Minor Change: avoid duplicate log of actions